package top.lcm889.oj.offer.按数据结构分类.链表;

/**
 * @author Coder-lcm
 * @date 2021/5/3
 */
public class OF17_打印从1到n的最大n位数 {
    public int[] printNumbers(int n) {
        int len = (int) Math.pow(10, n) -1;
        int[] res = new int[len];
        for (int i = 0; i < len; i++) {
            res[i] = i+1;
        }
        return res;
    }

    public static void main(String[] args) {
        OF17_打印从1到n的最大n位数 test = new OF17_打印从1到n的最大n位数();
        int[] res = test.printNumbers(2);
        for (int i : res) {
            System.out.print(i + " ");
        }
    }
}
